package com.jeespring.order.controller;

import com.jeespring.dto.String;
import com.jeespring.order.feign.PayFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/feign/order")
public class OrderController {

    @Autowired
    PayFeignService payFeignService;

    @GetMapping("/get/{id}")
    public String selectById(@PathVariable Long id){
        String String = payFeignService.selectById(id);
        return String;
    }

    @GetMapping("/timeout")
    public String timeout(){
        String String = new String();
        try {
            String = payFeignService.timeout();
        } catch (Exception e) {
            String.setMsg(e.getMessage());
        }
        return String;
    }
}
